import request from "@/utils/request";
import qs from "qs";

export const getRoleApi = (params) => {
  return request({
    url: "roles/index.jsp",
    method: "get",
    params,
  });
};

export const postRoleApi = (params) => {
  return request({
    url: "roles/create.jsp",
    method: "post",
    // data: '参数名=数据&参数名=数据',
    data: qs.stringify(params),
  });
};

export const deleteRoleApi = (params) => {
  return request({
    url: "/roles/delete.jsp",
    method: "delete",
    params,
  });
};

export const putRoleApi = (params) => {
  return request({
    url: "roles/update.jsp",
    method: "put",
    // data: '参数名=数据&参数名=数据',
    data: qs.stringify(params),
  });
};

export const putRoleAssignApi = (params) => {
  return request({
    url: "roles/assign.jsp",
    method: "put",
    // data: '参数名=数据&参数名=数据',
    data: qs.stringify(params),
  });
};
